import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './plugins/element.js'
Vue.config.productionTip = false
// 配置echarts
import echarts from 'echarts'
// 在原型链中注册，然后在需要的页面调用：this.$echarts
Vue.prototype.$echarts = echarts
// 配置axios
import axios from "./uilts/Request"
Vue.prototype.$axios = axios
// 富文本
import VueQuillEditor from 'vue-quill-editor'
import 'quill/dist/quill.core.css' // import styles
import 'quill/dist/quill.snow.css' // for snow theme
import 'quill/dist/quill.bubble.css' // for bubble theme
Vue.use(VueQuillEditor, /* { default global options } */)

// 路由守卫
router.beforeEach((to, from, next) => {

  // 面包屑
  if (to.hasOwnProperty("meta")) {
    store.commit("bread", { path: to.path, name: to.meta.name })
  }
  next()
})


new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
